package com.slkj.shilixiaoyuanapp.entity.parent;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 作者：何磊 on 2018/10/15 10:11
 * 描述：
 */
public class SchoolActivitysDetailEntity implements Parcelable{
    /**
     * summary : sadsa
     * auditId : 35
     * image : ["http://47.106.8.136:8081/images/school0/award/1539574023365.png"]
     * address : wqe
     * activityTime : 2018-10-15
     * title : weqw
     * type : 公益活动
     * studentId : 122
     * refute :
     * studentName : 胡峻熙
     * auditors : [{"uId":4,"uName":"邓平平","headImg":"/images/school3/head/1534823090482.png","state":0,"refute":""}]
     * comment :
     * id : 19
     * state : 0
     */

    private String summary;
    private int auditId;
    private String address;
    private String activityTime;
    private String title;
    private String type;
    private int studentId;
    private String refute;
    private String studentName;
    private String comment;
    private int id;
    private int state;
    private List<String> image;
    private List<AuditorsBean> auditors;
    private double hours;
    private int myState;
    private String myRefute;

    protected SchoolActivitysDetailEntity(Parcel in) {
        summary = in.readString();
        auditId = in.readInt();
        address = in.readString();
        activityTime = in.readString();
        title = in.readString();
        type = in.readString();
        studentId = in.readInt();
        refute = in.readString();
        studentName = in.readString();
        comment = in.readString();
        id = in.readInt();
        state = in.readInt();
        image = in.createStringArrayList();
        auditors = in.createTypedArrayList(AuditorsBean.CREATOR);
        hours = in.readDouble();
        myState=in.readInt();
        myRefute=in.readString();
    }

    public static final Creator<SchoolActivitysDetailEntity> CREATOR = new Creator<SchoolActivitysDetailEntity>() {
        @Override
        public SchoolActivitysDetailEntity createFromParcel(Parcel in) {
            return new SchoolActivitysDetailEntity(in);
        }

        @Override
        public SchoolActivitysDetailEntity[] newArray(int size) {
            return new SchoolActivitysDetailEntity[size];
        }
    };

    public int getMyState() {
        return myState;
    }

    public void setMyState(int myState) {
        this.myState = myState;
    }

    public String getMyRefute() {
        return myRefute;
    }

    public void setMyRefute(String myRefute) {
        this.myRefute = myRefute;
    }

    public double getHours() {
        return hours;
    }

    public void setHours(double hours) {
        this.hours = hours;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public int getAuditId() {
        return auditId;
    }

    public void setAuditId(int auditId) {
        this.auditId = auditId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getActivityTime() {
        return activityTime;
    }

    public void setActivityTime(String activityTime) {
        this.activityTime = activityTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getStudentId() {
        return studentId;
    }

    public void setStudentId(int studentId) {
        this.studentId = studentId;
    }

    public String getRefute() {
        return refute;
    }

    public void setRefute(String refute) {
        this.refute = refute;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public List<String> getImage() {
        return image;
    }

    public void setImage(List<String> image) {
        this.image = image;
    }

    public List<AuditorsBean> getAuditors() {
        return auditors;
    }

    public void setAuditors(List<AuditorsBean> auditors) {
        this.auditors = auditors;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(summary);
        dest.writeInt(auditId);
        dest.writeString(address);
        dest.writeString(activityTime);
        dest.writeString(title);
        dest.writeString(type);
        dest.writeInt(studentId);
        dest.writeString(refute);
        dest.writeString(studentName);
        dest.writeString(comment);
        dest.writeInt(id);
        dest.writeInt(state);
        dest.writeStringList(image);
        dest.writeTypedList(auditors);
        dest.writeDouble(hours);
        dest.writeInt(myState);
        dest.writeString(myRefute);
    }

    public static class AuditorsBean implements Parcelable {
        /**
         * uId : 4
         * uName : 邓平平
         * headImg : /images/school3/head/1534823090482.png
         * state : 0
         * refute :
         */

        private int uId;
        private String uName;
        private String headImg;
        private int state;
        private String refute;

        protected AuditorsBean(Parcel in) {
            uId = in.readInt();
            uName = in.readString();
            headImg = in.readString();
            state = in.readInt();
            refute = in.readString();
        }

        public static final Creator<AuditorsBean> CREATOR = new Creator<AuditorsBean>() {
            @Override
            public AuditorsBean createFromParcel(Parcel in) {
                return new AuditorsBean(in);
            }

            @Override
            public AuditorsBean[] newArray(int size) {
                return new AuditorsBean[size];
            }
        };

        public int getUId() {
            return uId;
        }

        public void setUId(int uId) {
            this.uId = uId;
        }

        public String getUName() {
            return uName;
        }

        public void setUName(String uName) {
            this.uName = uName;
        }

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public String getRefute() {
            return refute;
        }

        public void setRefute(String refute) {
            this.refute = refute;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(uId);
            dest.writeString(uName);
            dest.writeString(headImg);
            dest.writeInt(state);
            dest.writeString(refute);
        }
    }
}
